package cn.hk.archives.service.impl;

import cn.hk.archives.domain.ArchivesChild;
import cn.hk.archives.domain.vo.ArchivesVo;
import cn.hk.archives.mapper.ArchivesChildMapper;
import cn.hk.archives.service.ArchivesChildService;
import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

/**
 * <p>
 * 儿童建档信息表 服务实现类
 * </p>
 *
 * @author xu
 * @since 2023-05-17
 */
@Service
public class ArchivesChildServiceImpl extends ServiceImpl<ArchivesChildMapper, ArchivesChild> implements ArchivesChildService {
    @Autowired
    private ArchivesChildMapper archiveChildMapper;
    @Override
    public ArchivesVo getUserArchivesChrByUserId(Long userId) {
        return archiveChildMapper.selectUserArchivesChrByUserId(userId);
    }

    @Override
    public Boolean addArchivesChild(ArchivesVo archivesVo) {
        return archiveChildMapper.insertArchivesChild(archivesVo);
    }

    @Override
    public Boolean editArchivesChild(ArchivesVo archivesVo) {
        return archiveChildMapper.updateArchivesChild(archivesVo);
    }
}
